<div class="content-section introduction " >
  <div>
    <span class="feature-title">定位管理 | <small>历史报警</small> </span>
  </div>
</div>
<div class="content-section implementation GridDemo clearfixes">
  <div class="mysearch">
    <form>
      <div class="ui-g">
        <div class="ui-g-4 ui-sm-12">
          <label class="ui-g-2 ui-sm-5 text-right">来访人员:</label>
          <div class="ui-g-4  ui-sm-7 ui-fluid">
            <input pInputText type="text" name="sid" [(ngModel)]="queryModel.condition.sid" />
          </div>
          <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">报警类型:</label>
          <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
            <p-dropdown [options]="flags" [(ngModel)]="queryModel.condition.status"></p-dropdown>
          </div>
        </div>

        <div class="ui-g-2 ui-sm-12">
          <label class="ui-g-4 ui-sm-5 text-right">报警等级:</label>
          <div class="ui-g-8  ui-sm-7 ui-fluid">
            <p-dropdown [options]="flags" [(ngModel)]="queryModel.condition.status"></p-dropdown>
          </div>
          <!--<label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">是否报警:</label>
          <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
            <p-dropdown [options]="flags" [(ngModel)]="queryModel.condition.status"></p-dropdown>
          </div>-->
        </div>

        <div class="ui-g-4 ui-sm-12">
          <label class="ui-g-3 ui-sm-5 text-right">报警时间:</label>
          <div class="ui-g-4  ui-sm-7 ui-fluid">
            <p-calendar  [showIcon]="true" [locale]="zh" name="time_start"
                         [styleClass]="'schedule-add'" dateFormat="yy-mm-dd"  dataType="string"
                         [minDate]="minDate" [(ngModel)]="queryModel.condition.begin_time"  >
            </p-calendar>
          </div>
          <label class="ui-g-1 ui-sm-5" >至:</label>
          <div class="ui-g-4  ui-sm-7 ui-fluid ">
            <p-calendar  [showIcon]="true" [locale]="zh" name="end_time"
                         [styleClass]="'schedule-add'" dateFormat="yy-mm-dd" dataType="string"
                         [minDate]="minDate" [(ngModel)]="queryModel.condition.end_time" >
            </p-calendar>
          </div>
        </div>

        <div class="ui-g-4 ui-sm-12">
          <label class="ui-g-2 ui-sm-5 text-right">处理状态:</label>
          <div class="ui-g-4  ui-sm-7 ui-fluid">
            <p-dropdown [options]="flags" [(ngModel)]="queryModel.condition.status"></p-dropdown>
          </div>
          <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">处理人:</label>
          <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
            <input  pInputText type="text" name="status" placeholder="经手人"  [(ngModel)]="queryModel.condition.creator" />
          </div>
        </div>

        <div class="ui-g-4 ui-sm-12">
          <div class="ui-g-6 ui-sm-12 option">
            <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
            <!--<button pButton  label="添加" ngClass="ui-sm-12"  (click)="showVisitorEdit()"></button>-->
          </div>
        </div>

      </div>
    </form>
  </div>
  <p-dataTable [value]="visitors">
    <!--<p-column selectionMode="multiple"></p-column>-->
    <p-column field="one" header="来访人员"></p-column>
    <p-column field="two" header="报警类型"></p-column>
    <p-column field="three" header="报警等级"></p-column>
    <p-column field="four" header="报警时间"></p-column>
    <p-column field="five" header="报警内容"></p-column>
    <p-column field="six" header="处理状态"></p-column>
    <p-column field="seven" header="处理人"></p-column>
    <p-column field="eight" header="处理时间"></p-column>
    <p-column styleClass="col-button" header="操作">
      <ng-template let-car="rowData" pTemplate="body">
        <button type="button" pButton (click)="showVisitorEdit()" label="处理"></button>
      </ng-template>
    </p-column>
    <ng-template pTemplate="emptymessage">
      当前没有数据
    </ng-template>
  </p-dataTable>
</div>

<!-- 编辑访客信息弹框 -->
<app-visitor-edit [currentVisitor]="selectVisitor" [state]="visitorState" (clostVisitorEdit)="clostVisitorEdit($event)" *ngIf="visitorEditMask"></app-visitor-edit>

<!-- 绑定定位标签弹框 -->
<app-bind-tag (clostBindTag)="clostBindTag($event)" *ngIf="bindTagMask"></app-bind-tag>
